home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15592 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: ix.netcom.com!news
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c,comp.unix.programmer
  4. Subject: Re: Q: '\n' character
  5. Date: Fri, 19 Apr 1996 13:10:28 GMT
  6. Organization: Netcom
  7. Message-ID: <31778fd7.139227668@nntp.ix.netcom.com>
  8. References: <4kj66f$k0o@ren.cei.net> <4kmdsv$ojc@masala.cc.uh.edu> <4kmhpsINN7ak@keats.ugrad.cs.ubc.ca> <AD97189A966891F2@mcdiala02.it.luc.edu> <4ktn04INNoev@keats.ugrad.cs.ubc.ca> <3176A389.4E48@connix.com>
  9. NNTP-Posting-Host: ix-dc14-19.ix.netcom.com
  10. X-NETCOM-Date: Fri Apr 19  8:14:02 AM CDT 1996
  11. X-Newsreader: Forte Agent .99d/32.182
  12.  
  13. Scott Hawley <shawley@connix.com> wrote:
  14.  
  15. > >Having a return value that is the same as one of the arguments is
  16. > >a complete waste of a ``data path'' that could be used to return
  17. > >pertinent information.
  18. > My manual says fgets returns the string pointed to by s or a NULL
  19. > on end-of-file. I would say finding the end of file is pretty
  20. > pertinent, wouldn't you?
  21.  
  22. But if it returned the number of characters read it could still return
  23. that information on end of file by returning EOF.  When not at end of
  24. file it would return something useful.
  25.  
  26. This would also have the advantage of being more consistent with other
  27. stream i/o functions.
  28.  
  29. Michael M Rubenstein
  30.